<template>
	<view class="more_menu">
		<block v-for="item in playlists" :key="item.id">
			<view class="item">
				<music-menu-item :desc="item.description"
												 :itemId="item.id"
												 :imageUrl="item.coverImgUrl"
												 :playCount="item.playCount" />
			</view>
		</block>
	</view>
</template>

<script>
	import { getMoreMenu } from '../../service/music_api.js'
	
	import musicMenuItem from '../../components/music-menu/music-menu-item.vue'
	
	export default {
		components: {
			musicMenuItem
		},
		data() {
			return {
				playlists: []
			}
		},
		onLoad() {
			this.getData()
		},
		methods: {
			getData() {
				getMoreMenu(18).then(res =>{
					this.playlists = res.data.playlists
				})
			}
		}
	}
</script>

<style scoped>
	.more_menu {
		display: flex;
		justify-content: space-around;
		flex-wrap: wrap;
	}
	.item {
		margin-bottom: 10rpx;
	}
</style>
